<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>餐厅菜品规格信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			layer.load(1, {
			    shade: [0.3,'#000'] //0.1透明度的白色背景
			});
			$("#searchForm").submit();
        	return false;
        }
        <shiro:hasPermission name="dishes:restaurantDishesStandard:edit">
		function deleteById(id){
			layer.confirm('确认要删除该餐厅菜品规格信息吗？', {
				btn: ['确定','取消']
			}, function(){
				window.location.href='${ctx}/dishes/restaurantDishesStandard/delete?id='+id;
			}, function(){
				layer.msg('删除取消', {
					time: 2000 //2s后自动关闭
					 });
			});
        }
        </shiro:hasPermission>
	</script>
</head>
<body>
	<ul class="nav nav-tabs nav-tabss">
		<li class="active"><a href="${ctx}/dishes/restaurantDishesStandard/">餐厅菜品规格信息列表</a></li>
		<shiro:hasPermission name="dishes:restaurantDishesStandard:edit"><li><a href="${ctx}/dishes/restaurantDishesStandard/form">餐厅菜品规格信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="restaurantDishesStandard" action="${ctx}/dishes/restaurantDishesStandard/" method="post" class="breadcrumb form-search form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
            <label>name：</label>
            <form:input path="name" htmlEscape="false" cssClass="form-control"/>
            <label>englishName：</label>
            <form:input path="englishName" htmlEscape="false" cssClass="form-control"/>
            <label>chineseName：</label>
            <form:input path="chineseName" htmlEscape="false" cssClass="form-control"/>
            <label>restaurantId：</label>
            <form:input path="restaurantId" htmlEscape="false" cssClass="form-control"/>
            <label>restaurantDishesId：</label>
            <form:input path="restaurantDishesId" htmlEscape="false" cssClass="form-control"/>
            <label>price：</label>
            <form:input path="price" htmlEscape="false" cssClass="form-control"/>
            <label>discountPrice：</label>
            <form:input path="discountPrice" htmlEscape="false" cssClass="form-control"/>
		&nbsp;<input id="btnSubmit" class="btn btn-sm btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
            <th>name</th>
            <th>englishName</th>
            <th>chineseName</th>
            <th>restaurantId</th>
            <th>restaurantDishesId</th>
            <th>price</th>
            <th>discountPrice</th>
			<shiro:hasPermission name="dishes:restaurantDishesStandard:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="restaurantDishesStandard">
			<tr>
                <td>${restaurantDishesStandard.name}</td>
                <td>${restaurantDishesStandard.englishName}</td>
                <td>${restaurantDishesStandard.chineseName}</td>
                <td>${restaurantDishesStandard.restaurantId}</td>
                <td>${restaurantDishesStandard.restaurantDishesId}</td>
                <td>${restaurantDishesStandard.price}</td>
                <td>${restaurantDishesStandard.discountPrice}</td>
				<shiro:hasPermission name="dishes:restaurantDishesStandard:edit"><td>
    				<a href="${ctx}/dishes/restaurantDishesStandard/form?id=${restaurantDishesStandard.id}">修改</a>
                    <a href="javascript:deleteById('${restaurantDishesStandard.id}')">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
